<template>
  <div class="title">微信注册</div>
  <el-form :model="user" label-width="120px">
    <el-form-item label="姓名">
      <el-input v-model="user.name" />
    </el-form-item>
    <el-form-item label="性别">
      <el-radio-group v-model="user.sex">
        <el-radio label="男" value="男"/>
        <el-radio label="女" value="女"/>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="学科">
      <el-select v-model="user.addr" placeholder="请选择你的学科">
        <el-option label="语文" value="语文" />
        <el-option label="数学" value="数学" />
        <el-option label="英语" value="英语" />
      </el-select>
    </el-form-item>
    <el-form-item label="爱好">
      <el-checkbox-group v-model="user.hobby">
        <el-checkbox label="羽毛球" name="type" />
        <el-checkbox label="足球" name="type" />
        <el-checkbox label="网球" name="type" />
      </el-checkbox-group>
    </el-form-item>
    
    <el-form-item>
      <el-button @click="clickme()">注册</el-button>
    </el-form-item>
  </el-form>
</template>

<script>

export default {
  name: 'App',
  data() {
    return {
      user: {
        name: '',
        addr: '',
        hobby: [],
        sex: '',
      }
    }
  },
  methods:{
    clickme(){
      alert('姓名：'+this.user.name+'性别：'+this.user.sex+'学科：'+this.user.addr+'爱好：'+this.user.hobby)
    }

  }
}
</script>

<style>
.title{
  font-size: large;
  width: 100px;
  margin: 10px auto ;
}
</style>